ifdef PLATFORM
	CROSS:=$(PLATFORM)-
else
	CROSS:=
	PLATFORM:=linux
endif

ifeq ($(RELEASE),1)
	BUILD:=release
else
	BUILD:=debug
endif

all:
	$(MAKE) -C tbox

clean:
	$(MAKE) -C tbox clean
	$(MAKE) -C test clean
	@\rm -rf release/*

.PHONY : test
test:
	ln -sf  tbox/$(BUILD).$(PLATFORM)/libtbox.so .
	$(MAKE) -C test
	#./test/$(BUILD).$(PLATFORM)/test

release: all test
	@cp	tbox/$(BUILD).$(PLATFORM)/libtbox.so release
	@cp	test/$(BUILD).$(PLATFORM)/test release
